package com.rain.cy.framework.result;

import lombok.Getter;

/**
 * @author ChenYu
 * @date 2017-12-1 18:09:30
 */
@Getter
public enum ErrorCodeEnum {

    /**
     * 成功
     */
    Success(200, "接口调用成功！"),
    BadRequest(400, "请求参数异常"),
    UnAuth(401, "链接无效，请检查链接是否正确"),
    NotFound(404, "资源未找到"),
    MethodNotAllowed(405, "Method Not Allowed"),
    UnSingleLogin(407, "登录过期,请重新登录"),
    AuthOverDue(409, "token认证过期"),
    Fail(500, "接口调用失败"),
    ParamInvalid(1001, "参数异常"),
    UserNotFound(1009, "用户不存在"),
    CellPhoneHasNotRegister(1010, "该手机号还没有被导入"),
    CellPhoneHasBeRegister(1011, "该手机号已经被注册"),
    MessageCodeInvalid(1012, "验证码为空或者已过期"),
    ;


    private final Integer code;

    private final String message;

    ErrorCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }


    public String getMessage() {
        return message;
    }

}
